<template>
  <el-dialog
    title="发送短信"
    :visible.sync="smsVisible"
    width="40%"
    :close-on-click-modal="false"
  >
    <div class="content">
      <el-form ref="form" label-width="100px">
        <el-form-item label="项目负责人">
          <el-input
            v-model="leaderTel"
            maxlength="11"
            placeholder="请输入联系人手机号"
          ></el-input>
        </el-form-item>
        <el-form-item label="责任主体企业手机号">
          <el-input
            v-model="managerTel"
            maxlength="11"
            placeholder="请输入联系人手机号"
          ></el-input>
        </el-form-item>
      </el-form>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancelPreview">取 消</el-button>
      <el-button type="primary" @click="savePreview" class="saveBtn"
        >确 定</el-button
      >
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'smsDialog',
  props: {
    leaderTel: {
      type: String,
    },
    managerTel: {
      type: String,
    },
  },
  data() {
    return {
      smsVisible: false,
      leaderTel: '',
      managerTel: '',
    }
  },
  methods: {
    showDialog() {
      this.smsVisible = true
    },
    hideDialog() {
      this.smsVisible = false
    },
    chooseNotice(val) {
      this.$emit('changeNotice', val)
    },
    //关闭弹出框
    cancelPreview() {
      this.hideDialog()
    },
    savePreview() {
      this.$emit('sure', this.leaderTel, this.managerTel)
      this.hideDialog()
    },
  },
}
</script>

<style scoped lang="less">
.content {
  .subTxt {
    margin-bottom: 8px;
    padding-left: 26px;
    line-height: 18px;
  }
}
/deep/ .el-dialog__footer {
  height: 60px;
}
/deep/ .el-checkbox__input.is-checked + .el-checkbox__label {
  color: #606266;
}

/deep/ .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: #009588;
  background: #009588;
}
</style>
